/**
 * 工具方法
 * 注:所有方法无需导入即可使用
 */

// 随机字符串
export const getRandomString = (e = 10) => {
   let t = "ABCDEFGHJKMNPQRSTWXYZ1234567890",
      a = t.length,
      n = "";
   for (let i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a));
   return n
}

// 随机范围内整数
export const getRandomNumber = (min = 0, max = 100) => {
   return Math.floor(Math.random() * (max - min + 1)) + min;
}

// 随机颜色
export const getRandomColor = () => {
   let color = "#";
   for (let i = 0; i < 6; i++) {
      color += (Math.random() * 16 | 0).toString(16).toUpperCase();
   }
   return color;
}
